package cn.dubito.seller.service;

import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author liliang
 * @description: 签名服务
 * @date 2018/5/29.
 */
@Service
public class SignService {

    private static Map<String, String> PUBLIC_KEY = new HashMap<>(16);

    static {
        PUBLIC_KEY.put("1000", "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4+6d4JxOUeHDPXU9RPmpjuDRY\n" +
                "+oPu4WN5zxzp1lOscMhqxacK8m9I9B2UNhUPtDjN1CDOHy+Ay9DRyvw8adUpiy6L\n" +
                "b7UEOc0CkvPGTcwMzB/p02jgtqwdarzcb9yGZcyfaiJeRrISJ68TciNIo7BMnPDL\n" +
                "6tExtG6Vde1BpbE4LQIDAQAB");
    }

    /**
     * 根据授权编号获取公钥
     *
     * @param authId
     * @return
     */
    public String getPublicKey(String authId) {
        return PUBLIC_KEY.get(authId);
    }
}
